package com.walker.weixin.entity.message;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.walker.weixin.entity.BaseMessage;

import java.io.Serializable;
import java.util.Map;

/**
 * @Description: 语音消息
 * @ProjectName: wms_step
 * @Package: com.walker.weixin.entity.message
 * @ClassName: VoiceMessage
 * @Author: yangyl
 * @CreateDate: 2020-07-20 16:32
 */
@XStreamAlias("xml")
public class VoiceMessage  extends BaseMessage implements Serializable {

    @XStreamAlias("Voice")
    private Voice voice;

    public VoiceMessage(Map<String, Object> requestMap, String mediaId) {
        super(requestMap, "voice");
        voice = new Voice(mediaId);
    }

    /**
     * 语音
     */
    public static class Voice implements Serializable {

        public Voice(String mediaId) {
            this.mediaId = mediaId;
        }

        @XStreamAlias("MediaId")
        private String mediaId;

        public String getMediaId() {
            return mediaId;
        }

        public void setMediaId(String mediaId) {
            this.mediaId = mediaId;
        }
    }


}